#pragma once

#include <QWidget>
#include <QPainter>
#include "ui_NewsCellWidget.h"
#include "NewsCellData.h"
//#include "Constant.h"

QT_BEGIN_NAMESPACE
namespace Ui { class NewsCellWidgetClass; };
QT_END_NAMESPACE

class NewsCellWidget : public QWidget
{
	Q_OBJECT

public:
	NewsCellWidget(QWidget *parent = nullptr);
	~NewsCellWidget();
	void setUi(NewsCellData* newsCellData);
private:
	Ui::NewsCellWidgetClass *ui;
	NewsCellData* newsCellData;
	virtual void mouseReleaseEvent(QMouseEvent* ev);
	virtual void paintEvent(QPaintEvent* ev);
signals:
	void on_newsCell_click(NewsCellWidget*);
};
